package com.xxq.gulimall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xxq.common.utils.PageUtils;
import com.xxq.gulimall.product.entity.AttrEntity;

import java.util.List;
import java.util.Map;

/**
 * 商品属性
 *
 * @author xxq
 * @email 1607903138@qq.com
 * @date 2022-04-28 20:20:14
 */
public interface AttrService extends IService<AttrEntity> {

    PageUtils queryPage(Map<String, Object> params);
    // 根据catelogId分页返回商品
    PageUtils queryPageByCatelogId(Map<String, Object> params, Long catelogId);
    // 存储商品
    void saveOrUpdateWithAttrGroupId(AttrEntity attr, String bool);
    // 获取组类的所有商品
    List<AttrEntity> getRelation(Long attrGroupId);
    // 携带组id与catelog路径
    AttrEntity getByIdWithCatelogPath(Long attrId);

    PageUtils getNoRelationAttr(Map<String, Object> params, Long attrgroupId);
}

